<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - MemCtrl/stats.cc</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../index.html">directory</a> - <a href="index.html">MemCtrl</a> - stats.cc</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">178</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">97.2 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">173</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : /*
<span class="lineNum">       2 </span>                :  * =====================================================================================
<span class="lineNum">       3 </span>                :  *
<span class="lineNum">       4 </span>                :  *       Filename:  stats.cc
<span class="lineNum">       5 </span>                :  *
<span class="lineNum">       6 </span>                :  *    Description:  
<span class="lineNum">       7 </span>                :  *
<span class="lineNum">       8 </span>                :  *        Version:  1.0
<span class="lineNum">       9 </span>                :  *        Created:  04/13/2010 06:53:30 PM
<span class="lineNum">      10 </span>                :  *       Revision:  none
<span class="lineNum">      11 </span>                :  *       Compiler:  gcc
<span class="lineNum">      12 </span>                :  *
<span class="lineNum">      13 </span>                :  *         Author:  SYED MINHAJ HASSAN
<span class="lineNum">      14 </span>                :  *        Company:  Georgia Institute of Technology
<span class="lineNum">      15 </span>                :  *
<span class="lineNum">      16 </span>                :  * =====================================================================================
<span class="lineNum">      17 </span>                :  */
<span class="lineNum">      18 </span>                : #include &quot;MC.h&quot;
<span class="lineNum">      19 </span>                : #include &quot;../MemCtrl/stats.h&quot;
<span class="lineNum">      20 </span>                : 
<span class="lineNum">      21 </span><span class="lineCov">         152889 : void Statistic::CollectStatsPerRequest(Request *req)</span>
<span class="lineNum">      22 </span>                : {
<span class="lineNum">      23 </span>                :  //   if (!(*doneOnce[req-&gt;threadId]))       
<span class="lineNum">      24 </span>                :     {   
<span class="lineNum">      25 </span>                :     ///////// calculating runing average ////////////////
<span class="lineNum">      26 </span>                : 
<span class="lineNum">      27 </span>                :     avgLatPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] 
<span class="lineNum">      28 </span>                :         = ( avgLatPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] * 1.0 / (reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] + 1) )
<span class="lineNum">      29 </span>                :         * ( reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] * 1.0 )       
<span class="lineNum">      30 </span><span class="lineCov">         152889 :         + ( (req-&gt;retireTime - req-&gt;arrivalTime) * 1.0 / (reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] + 1) );</span>
<span class="lineNum">      31 </span>                :     
<span class="lineNum">      32 </span>                :     avgThrottlePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] 
<span class="lineNum">      33 </span>                :         = ( avgThrottlePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] * 1.0 / (reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] + 1) )
<span class="lineNum">      34 </span>                :         * ( reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] * 1.0 )       
<span class="lineNum">      35 </span><span class="lineCov">         152889 :         + ( req-&gt;throttleTime * 1.0 / (reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] + 1) );</span>
<span class="lineNum">      36 </span>                : 
<span class="lineNum">      37 </span><span class="lineCov">         152889 :     reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo]++;    </span>
<span class="lineNum">      38 </span><span class="lineCov">         152889 :     latPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += (req-&gt;retireTime - req-&gt;arrivalTime);</span>
<span class="lineNum">      39 </span>                :     
<span class="lineNum">      40 </span><span class="lineCov">         152889 :     TotalFrontSideTimePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += (req-&gt;rbufferInsertionTime - req-&gt;arrivalTime);</span>
<span class="lineNum">      41 </span><span class="lineCov">         152889 :     TotalQueueDelayPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += (req-&gt;cbufferInsertionTime - req-&gt;rbufferInsertionTime);</span>
<span class="lineNum">      42 </span><span class="lineCov">         152889 :     TotalCBufDelayPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += (req-&gt;busInsertionTime - req-&gt;cbufferInsertionTime);</span>
<span class="lineNum">      43 </span><span class="lineCov">         152889 :     TotalBusMemDelayPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += (req-&gt;retireTime - req-&gt;busInsertionTime - 1);</span>
<span class="lineNum">      44 </span>                : #ifdef DEBUG
<span class="lineNum">      45 </span>                :     cout &lt;&lt; &quot;MC[&quot; &lt;&lt; ((MC*)mc)-&gt;id &lt;&lt; &quot;] &quot; &lt;&lt; req-&gt;address &lt;&lt; &quot;: &quot; &lt;&lt; Simulator::Now() 
<span class="lineNum">      46 </span>                :         &lt;&lt;  &quot;: Reached stats collection with arrival Time = &quot;&lt;&lt; req-&gt;arrivalTime 
<span class="lineNum">      47 </span>                :         &lt;&lt; &quot;, req buffer insertion time = &quot; &lt;&lt; req-&gt;rbufferInsertionTime 
<span class="lineNum">      48 </span>                :         &lt;&lt; &quot; cmd queue insertion time = &quot; &lt;&lt; req-&gt;cbufferInsertionTime 
<span class="lineNum">      49 </span>                :         &lt;&lt; &quot;, bus insertion time = &quot; &lt;&lt; req-&gt;busInsertionTime 
<span class="lineNum">      50 </span>                :         &lt;&lt; &quot;and retire time = &quot; &lt;&lt; req-&gt;retireTime &lt;&lt; endl;
<span class="lineNum">      51 </span>                : #endif
<span class="lineNum">      52 </span>                :     //throttlePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] += req-&gt;throttleTime;       
<span class="lineNum">      53 </span><span class="lineCov">         152889 :     if (req-&gt;status == OPEN)    </span>
<span class="lineNum">      54 </span><span class="lineCov">          63894 :         hitsPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo]++;</span>
<span class="lineNum">      55 </span>                :     hitRatePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] =  hitsPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] * 100.0
<span class="lineNum">      56 </span><span class="lineCov">         152889 :                                                          / reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo];  </span>
<span class="lineNum">      57 </span>                :     }
<span class="lineNum">      58 </span>                : //      cout &lt;&lt; req-&gt;status &lt;&lt; endl;
<span class="lineNum">      59 </span>                : //    cout &lt;&lt; &quot;Latency &quot; &lt;&lt; latPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] &lt;&lt; endl;
<span class="lineNum">      60 </span>                : //    cout &lt;&lt; &quot;Average Latency &quot; &lt;&lt; avgLatPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] &lt;&lt; endl;
<span class="lineNum">      61 </span>                : //    cout &lt;&lt; &quot;Requests &quot; &lt;&lt; reqPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] &lt;&lt; endl;
<span class="lineNum">      62 </span>                : //    cout &lt;&lt; &quot;Hits &quot; &lt;&lt; hitsPerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] &lt;&lt; endl;
<span class="lineNum">      63 </span>                : //    cout &lt;&lt; &quot;Hit Rate &quot; &lt;&lt; hitRatePerThreadPerBank[req-&gt;threadId][req-&gt;bankNo] &lt;&lt; endl;
<span class="lineNum">      64 </span>                :         
<span class="lineNum">      65 </span><span class="lineCov">         152889 : }</span>
<span class="lineNum">      66 </span>                : 
<span class="lineNum">      67 </span><span class="lineNoCov">              0 : void Statistic::CollectStatsPerCycle()</span>
<span class="lineNum">      68 </span>                : {
<span class="lineNum">      69 </span><span class="lineNoCov">              0 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">      70 </span>                :     {
<span class="lineNum">      71 </span><span class="lineNoCov">              0 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">      72 </span>                :         {
<span class="lineNum">      73 </span><span class="lineNoCov">              0 :             for (unsigned int k=0; k&lt;NO_OF_BUFFERS; k++)</span>
<span class="lineNum">      74 </span>                :             {
<span class="lineNum">      75 </span>                : //              if ( ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].rbuffer[k].empty() )
<span class="lineNum">      76 </span>                : //                  emptyCycles[i][j][k]++;
<span class="lineNum">      77 </span>                : //              rbufferOccupancy[i][j][k] += ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].rbuffer[k].size();
<span class="lineNum">      78 </span>                :             }
<span class="lineNum">      79 </span>                :         }
<span class="lineNum">      80 </span>                :     }           
<span class="lineNum">      81 </span>                :     
<span class="lineNum">      82 </span><span class="lineNoCov">              0 : }</span>
<span class="lineNum">      83 </span>                : 
<span class="lineNum">      84 </span><span class="lineCov">              8 : void Statistic::InitStats()</span>
<span class="lineNum">      85 </span>                : {
<span class="lineNum">      86 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">      87 </span>                :     {
<span class="lineNum">      88 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">      89 </span>                :         {
<span class="lineNum">      90 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BUFFERS; k++)</span>
<span class="lineNum">      91 </span>                :             {
<span class="lineNum">      92 </span><span class="lineCov">            128 :                 emptyCycles[i][j][k] = 0;</span>
<span class="lineNum">      93 </span><span class="lineCov">            128 :                 rbufferOccupancy[i][j][k] = 0;</span>
<span class="lineNum">      94 </span>                :             }   
<span class="lineNum">      95 </span>                :         }
<span class="lineNum">      96 </span>                :     }           
<span class="lineNum">      97 </span>                : /*    for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)
<span class="lineNum">      98 </span>                :     {
<span class="lineNum">      99 </span>                :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)
<span class="lineNum">     100 </span>                :         {
<span class="lineNum">     101 </span>                :             for (unsigned int k=0; k&lt;NO_OF_BUFFERS; k++)
<span class="lineNum">     102 </span>                :             {
<span class="lineNum">     103 </span>                :                 rbufferOccupancy[i][j][k] += ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].rbuffer[k].size();
<span class="lineNum">     104 </span>                :             }
<span class="lineNum">     105 </span>                :         }
<span class="lineNum">     106 </span>                :     }           
<span class="lineNum">     107 </span>                : */      
<span class="lineNum">     108 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     109 </span>                :     {
<span class="lineNum">     110 </span><span class="lineCov">            512 :         avgLatPerThread[i] = 0.0;</span>
<span class="lineNum">     111 </span><span class="lineCov">            512 :         latPerThread[i] = 0;</span>
<span class="lineNum">     112 </span><span class="lineCov">            512 :         reqPerThread[i] = 0;</span>
<span class="lineNum">     113 </span><span class="lineCov">            512 :         hitsPerThread[i] = 0;</span>
<span class="lineNum">     114 </span><span class="lineCov">            512 :         hitRatePerThread[i] = 0.0;</span>
<span class="lineNum">     115 </span><span class="lineCov">            512 :         BLPPerThread[i] = 0.0;</span>
<span class="lineNum">     116 </span><span class="lineCov">            512 :         avgThrottlePerThread[i] = 0.0;</span>
<span class="lineNum">     117 </span><span class="lineCov">            512 :         throttlePerThread[i] = 0;</span>
<span class="lineNum">     118 </span><span class="lineCov">            512 :         avgFrontSideTimePerThread[i] = 0;</span>
<span class="lineNum">     119 </span><span class="lineCov">            512 :         avgQueueDelayPerThread[i] = 0;</span>
<span class="lineNum">     120 </span><span class="lineCov">            512 :         avgCBufDelayPerThread[i] = 0;</span>
<span class="lineNum">     121 </span><span class="lineCov">            512 :         avgBusMemDelayPerThread[i] = 0; </span>
<span class="lineNum">     122 </span><span class="lineCov">            512 :         TotalFrontSideTimePerThread[i] = 0;</span>
<span class="lineNum">     123 </span><span class="lineCov">            512 :         TotalQueueDelayPerThread[i] = 0;</span>
<span class="lineNum">     124 </span><span class="lineCov">            512 :         TotalCBufDelayPerThread[i] = 0;</span>
<span class="lineNum">     125 </span><span class="lineCov">            512 :         TotalBusMemDelayPerThread[i] = 0;       </span>
<span class="lineNum">     126 </span>                :     }
<span class="lineNum">     127 </span>                : 
<span class="lineNum">     128 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)</span>
<span class="lineNum">     129 </span>                :     {
<span class="lineNum">     130 </span><span class="lineCov">             64 :         avgLatPerBank[i] = 0.0;</span>
<span class="lineNum">     131 </span><span class="lineCov">             64 :         latPerBank[i] = 0;</span>
<span class="lineNum">     132 </span><span class="lineCov">             64 :         reqPerBank[i] = 0;</span>
<span class="lineNum">     133 </span><span class="lineCov">             64 :         hitsPerBank[i] = 0;</span>
<span class="lineNum">     134 </span><span class="lineCov">             64 :         hitRatePerBank[i] = 0.0;</span>
<span class="lineNum">     135 </span><span class="lineCov">             64 :         avgThrottlePerBank[i] = 0.0;</span>
<span class="lineNum">     136 </span><span class="lineCov">             64 :         throttlePerBank[i] = 0;</span>
<span class="lineNum">     137 </span><span class="lineCov">             64 :         avgFrontSideTimePerBank[i] = 0;</span>
<span class="lineNum">     138 </span><span class="lineCov">             64 :         avgQueueDelayPerBank[i] = 0;</span>
<span class="lineNum">     139 </span><span class="lineCov">             64 :         avgCBufDelayPerBank[i] = 0;</span>
<span class="lineNum">     140 </span><span class="lineCov">             64 :         avgBusMemDelayPerBank[i] = 0;   </span>
<span class="lineNum">     141 </span><span class="lineCov">             64 :         TotalFrontSideTimePerBank[i] = 0;</span>
<span class="lineNum">     142 </span><span class="lineCov">             64 :         TotalQueueDelayPerBank[i] = 0;</span>
<span class="lineNum">     143 </span><span class="lineCov">             64 :         TotalCBufDelayPerBank[i] = 0;</span>
<span class="lineNum">     144 </span><span class="lineCov">             64 :         TotalBusMemDelayPerBank[i] = 0; </span>
<span class="lineNum">     145 </span>                :     }   
<span class="lineNum">     146 </span>                : 
<span class="lineNum">     147 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     148 </span>                :     {
<span class="lineNum">     149 </span><span class="lineCov">           4608 :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)</span>
<span class="lineNum">     150 </span>                :         {        
<span class="lineNum">     151 </span><span class="lineCov">           4096 :             avgLatPerThreadPerBank[i][j] = 0.0;</span>
<span class="lineNum">     152 </span><span class="lineCov">           4096 :             latPerThreadPerBank[i][j] = 0;   </span>
<span class="lineNum">     153 </span><span class="lineCov">           4096 :             reqPerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     154 </span><span class="lineCov">           4096 :             hitsPerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     155 </span><span class="lineCov">           4096 :             hitRatePerThreadPerBank[i][j] = 0.0;</span>
<span class="lineNum">     156 </span><span class="lineCov">           4096 :             avgThrottlePerThreadPerBank[i][j] = 0.0;</span>
<span class="lineNum">     157 </span><span class="lineCov">           4096 :             throttlePerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     158 </span>                :            
<span class="lineNum">     159 </span><span class="lineCov">           4096 :             TotalFrontSideTimePerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     160 </span><span class="lineCov">           4096 :             TotalQueueDelayPerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     161 </span><span class="lineCov">           4096 :             TotalCBufDelayPerThreadPerBank[i][j] = 0;</span>
<span class="lineNum">     162 </span><span class="lineCov">           4096 :             TotalBusMemDelayPerThreadPerBank[i][j] = 0; </span>
<span class="lineNum">     163 </span>                :         }
<span class="lineNum">     164 </span>                :     }
<span class="lineNum">     165 </span><span class="lineCov">              8 : }</span>
<span class="lineNum">     166 </span>                : 
<span class="lineNum">     167 </span><span class="lineCov">              8 : void Statistic::CalculateAggregateStats()</span>
<span class="lineNum">     168 </span>                : {
<span class="lineNum">     169 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     170 </span>                :     {
<span class="lineNum">     171 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">     172 </span>                :         {
<span class="lineNum">     173 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BANKS; k++)</span>
<span class="lineNum">     174 </span>                :             {
<span class="lineNum">     175 </span><span class="lineCov">            128 :                 if (((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].bank[k].bufferOccupancy != 0)</span>
<span class="lineNum">     176 </span><span class="lineCov">            114 :                     rbufferOccupancyRatio[i][j][k] = ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].bank[k].bufferSize*1.0 / ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].bank[k].bufferOccupancy;</span>
<span class="lineNum">     177 </span>                :                 
<span class="lineNum">     178 </span><span class="lineCov">            128 :                 bufferFullCycles[i][j][k] = ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].bank[k].bufferFullCounter;</span>
<span class="lineNum">     179 </span>                :             }
<span class="lineNum">     180 </span>                :         }
<span class="lineNum">     181 </span>                :     }           
<span class="lineNum">     182 </span><span class="lineCov">             72 :     for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)</span>
<span class="lineNum">     183 </span>                :     {           
<span class="lineNum">     184 </span><span class="lineCov">           4160 :         for (unsigned int i=0; i&lt;NO_OF_THREADS; i++) </span>
<span class="lineNum">     185 </span>                :         {
<span class="lineNum">     186 </span>                :             
<span class="lineNum">     187 </span><span class="lineCov">           4096 :             latPerBank[j] += latPerThreadPerBank[i][j];</span>
<span class="lineNum">     188 </span><span class="lineCov">           4096 :             throttlePerBank[j] += throttlePerThreadPerBank[i][j];       </span>
<span class="lineNum">     189 </span><span class="lineCov">           4096 :             reqPerBank[j] += reqPerThreadPerBank[i][j];</span>
<span class="lineNum">     190 </span><span class="lineCov">           4096 :             hitsPerBank[j] += hitsPerThreadPerBank[i][j];</span>
<span class="lineNum">     191 </span><span class="lineCov">           4096 :             avgLatPerBank[j] += (avgLatPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);</span>
<span class="lineNum">     192 </span><span class="lineCov">           4096 :             avgThrottlePerBank[j] += (avgThrottlePerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);           </span>
<span class="lineNum">     193 </span>                :         //    avgFrontSideTimePerBank[j] += (avgFrontSideTimePerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     194 </span>                :         //    avgQueueDelayPerBank[j] += (avgQueueDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     195 </span>                :         //    avgCBufDelayPerBank[j] += (avgCBufDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     196 </span>                :         //    avgBusMemDelayPerBank[j] += (avgBusMemDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);   
<span class="lineNum">     197 </span><span class="lineCov">           4096 :             TotalFrontSideTimePerBank[j] += TotalFrontSideTimePerThreadPerBank[i][j];</span>
<span class="lineNum">     198 </span><span class="lineCov">           4096 :             TotalQueueDelayPerBank[j] += TotalQueueDelayPerThreadPerBank[i][j];</span>
<span class="lineNum">     199 </span><span class="lineCov">           4096 :             TotalCBufDelayPerBank[j] += TotalCBufDelayPerThreadPerBank[i][j];</span>
<span class="lineNum">     200 </span><span class="lineCov">           4096 :             TotalBusMemDelayPerBank[j] += TotalBusMemDelayPerThreadPerBank[i][j];       </span>
<span class="lineNum">     201 </span>                :         }
<span class="lineNum">     202 </span><span class="lineCov">             64 :         if (reqPerBank[j] !=0 ) </span>
<span class="lineNum">     203 </span>                :         {
<span class="lineNum">     204 </span><span class="lineCov">             64 :         avgLatPerBank[j] = avgLatPerBank[j] / reqPerBank[j];</span>
<span class="lineNum">     205 </span><span class="lineCov">             64 :         avgThrottlePerBank[j] = avgThrottlePerBank[j] / reqPerBank[j];</span>
<span class="lineNum">     206 </span><span class="lineCov">             64 :         hitRatePerBank[j] += hitsPerBank[j] * 100.0 / reqPerBank[j];</span>
<span class="lineNum">     207 </span>                : 
<span class="lineNum">     208 </span><span class="lineCov">             64 :         avgFrontSideTimePerBank[j] = TotalFrontSideTimePerBank[j]*1.0 / reqPerBank[j];</span>
<span class="lineNum">     209 </span><span class="lineCov">             64 :         avgQueueDelayPerBank[j] = TotalQueueDelayPerBank[j]*1.0 / reqPerBank[j];</span>
<span class="lineNum">     210 </span><span class="lineCov">             64 :         avgCBufDelayPerBank[j] = TotalCBufDelayPerBank[j]*1.0 / reqPerBank[j];</span>
<span class="lineNum">     211 </span><span class="lineCov">             64 :         avgBusMemDelayPerBank[j] = TotalBusMemDelayPerBank[j]*1.0 / reqPerBank[j];      </span>
<span class="lineNum">     212 </span>                :         }
<span class="lineNum">     213 </span>                :     }
<span class="lineNum">     214 </span>                :     
<span class="lineNum">     215 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     216 </span>                :     {           
<span class="lineNum">     217 </span><span class="lineCov">           4608 :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)</span>
<span class="lineNum">     218 </span>                :         { 
<span class="lineNum">     219 </span><span class="lineCov">           4096 :             latPerThread[i] += latPerThreadPerBank[i][j];</span>
<span class="lineNum">     220 </span><span class="lineCov">           4096 :             throttlePerThread[i] += throttlePerThreadPerBank[i][j];</span>
<span class="lineNum">     221 </span><span class="lineCov">           4096 :             reqPerThread[i] += reqPerThreadPerBank[i][j];</span>
<span class="lineNum">     222 </span><span class="lineCov">           4096 :             hitsPerThread[i] += hitsPerThreadPerBank[i][j];</span>
<span class="lineNum">     223 </span><span class="lineCov">           4096 :             avgLatPerThread[i] += (avgLatPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);</span>
<span class="lineNum">     224 </span><span class="lineCov">           4096 :             avgThrottlePerThread[i] += (avgThrottlePerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);         </span>
<span class="lineNum">     225 </span>                :         //    avgFrontSideTimePerThread[i] += (avgFrontSideTimePerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     226 </span>                :         //    avgQueueDelayPerThread[i] += (avgQueueDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     227 </span>                :         //    avgCBufDelayPerThread[i] += (avgCBufDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]);
<span class="lineNum">     228 </span>                :         //    avgBusMemDelayPerThread[i] += (avgBusMemDelayPerThreadPerBank[i][j] * reqPerThreadPerBank[i][j]); 
<span class="lineNum">     229 </span><span class="lineCov">           4096 :             TotalFrontSideTimePerThread[i] += TotalFrontSideTimePerThreadPerBank[i][j];</span>
<span class="lineNum">     230 </span><span class="lineCov">           4096 :             TotalQueueDelayPerThread[i] += TotalQueueDelayPerThreadPerBank[i][j];</span>
<span class="lineNum">     231 </span><span class="lineCov">           4096 :             TotalCBufDelayPerThread[i] += TotalCBufDelayPerThreadPerBank[i][j];</span>
<span class="lineNum">     232 </span><span class="lineCov">           4096 :             TotalBusMemDelayPerThread[i] += TotalBusMemDelayPerThreadPerBank[i][j];     </span>
<span class="lineNum">     233 </span>                :         }
<span class="lineNum">     234 </span><span class="lineCov">            512 :         if (reqPerThread[i])</span>
<span class="lineNum">     235 </span>                :         {
<span class="lineNum">     236 </span><span class="lineCov">            448 :         avgLatPerThread[i] = avgLatPerThread[i] / reqPerThread[i];</span>
<span class="lineNum">     237 </span><span class="lineCov">            448 :         avgThrottlePerThread[i] = avgThrottlePerThread[i] / reqPerThread[i];</span>
<span class="lineNum">     238 </span><span class="lineCov">            448 :         hitRatePerThread[i] += hitsPerThread[i] * 100.0 / reqPerThread[i];</span>
<span class="lineNum">     239 </span>                :         
<span class="lineNum">     240 </span><span class="lineCov">            448 :         avgFrontSideTimePerThread[i] = TotalFrontSideTimePerThread[i]*1.0 / reqPerThread[i];</span>
<span class="lineNum">     241 </span><span class="lineCov">            448 :         avgQueueDelayPerThread[i] = TotalQueueDelayPerThread[i]*1.0 / reqPerThread[i];</span>
<span class="lineNum">     242 </span><span class="lineCov">            448 :         avgCBufDelayPerThread[i] = TotalCBufDelayPerThread[i]*1.0 / reqPerThread[i];</span>
<span class="lineNum">     243 </span><span class="lineCov">            448 :         avgBusMemDelayPerThread[i] = TotalBusMemDelayPerThread[i]*1.0 / reqPerThread[i];        </span>
<span class="lineNum">     244 </span>                :         }
<span class="lineNum">     245 </span>                :     }           
<span class="lineNum">     246 </span><span class="lineCov">              8 : }</span>
<span class="lineNum">     247 </span>                : 
<span class="lineNum">     248 </span><span class="lineCov">              8 : string Statistic::PrintAggregateStats( uint n)</span>
<span class="lineNum">     249 </span>                : {
<span class="lineNum">     250 </span><span class="lineCov">              8 :     stringstream str;</span>
<span class="lineNum">     251 </span><span class="lineCov">              8 :     str &lt;&lt; dec;   </span>
<span class="lineNum">     252 </span>                : /*    for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)   
<span class="lineNum">     253 </span>                :     {           
<span class="lineNum">     254 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     255 </span>                :         { 
<span class="lineNum">     256 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Request  for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; reqPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     257 </span>                :         }
<span class="lineNum">     258 </span>                :     }
<span class="lineNum">     259 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     260 </span>                : 
<span class="lineNum">     261 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     262 </span>                :     {           
<span class="lineNum">     263 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     264 </span>                :         { 
<span class="lineNum">     265 </span>                :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Avg Latency for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; avgLatPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     266 </span>                :         }
<span class="lineNum">     267 </span>                :     }
<span class="lineNum">     268 </span>                : 
<span class="lineNum">     269 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     270 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     271 </span>                :     {           
<span class="lineNum">     272 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     273 </span>                :         { 
<span class="lineNum">     274 </span>                :                 str &lt;&lt; &quot;Avg Throttling time for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; avgThrottlePerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     275 </span>                :         }
<span class="lineNum">     276 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     277 </span>                :     }
<span class="lineNum">     278 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     279 </span>                :     
<span class="lineNum">     280 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     281 </span>                :     {           
<span class="lineNum">     282 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     283 </span>                :         { 
<span class="lineNum">     284 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hits for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; hitsPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     285 </span>                :         }
<span class="lineNum">     286 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     287 </span>                :     }   
<span class="lineNum">     288 </span>                : 
<span class="lineNum">     289 </span>                : 
<span class="lineNum">     290 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     291 </span>                :     {           
<span class="lineNum">     292 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     293 </span>                :         { 
<span class="lineNum">     294 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hit Rate for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; hitRatePerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     295 </span>                :         }
<span class="lineNum">     296 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     297 </span>                :     }   
<span class="lineNum">     298 </span>                : 
<span class="lineNum">     299 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     300 </span>                :     {           
<span class="lineNum">     301 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     302 </span>                :         { 
<span class="lineNum">     303 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total FrontSide Time for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; TotalFrontSideTimePerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     304 </span>                :         }
<span class="lineNum">     305 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     306 </span>                :     }   
<span class="lineNum">     307 </span>                : 
<span class="lineNum">     308 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     309 </span>                :     {           
<span class="lineNum">     310 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     311 </span>                :         { 
<span class="lineNum">     312 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Queuing Delay for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; TotalQueueDelayPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     313 </span>                :         }
<span class="lineNum">     314 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     315 </span>                :     }   
<span class="lineNum">     316 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     317 </span>                :     {           
<span class="lineNum">     318 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     319 </span>                :         { 
<span class="lineNum">     320 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Cmd Buffer Time for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; TotalCBufDelayPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     321 </span>                :         }
<span class="lineNum">     322 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     323 </span>                :     }   
<span class="lineNum">     324 </span>                :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     
<span class="lineNum">     325 </span>                :     {           
<span class="lineNum">     326 </span>                :         for (unsigned int j=0; j&lt;NO_OF_BANKS; j++)
<span class="lineNum">     327 </span>                :         { 
<span class="lineNum">     328 </span>                :             str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Bus &amp; Memory Time for Thread &quot; &lt;&lt; i &lt;&lt; &quot;, bank &quot; &lt;&lt; j &lt;&lt; &quot; = &quot; &lt;&lt; TotalBusMemDelayPerThreadPerBank[i][j] &lt;&lt; endl;
<span class="lineNum">     329 </span>                :         }
<span class="lineNum">     330 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     331 </span>                :     }   
<span class="lineNum">     332 </span>                : 
<span class="lineNum">     333 </span>                : */
<span class="lineNum">     334 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     335 </span>                :     {           
<span class="lineNum">     336 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Request  for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; reqPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     337 </span>                :     }
<span class="lineNum">     338 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     339 </span>                :    
<span class="lineNum">     340 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     341 </span>                :     {           
<span class="lineNum">     342 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hits  for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; hitsPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     343 </span>                :     }
<span class="lineNum">     344 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     345 </span>                : 
<span class="lineNum">     346 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     347 </span>                :     {           
<span class="lineNum">     348 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hit Rate  for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; hitRatePerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     349 </span>                :     }
<span class="lineNum">     350 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     351 </span>                : 
<span class="lineNum">     352 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     353 </span>                :     {           
<span class="lineNum">     354 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Latency  for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgLatPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     355 </span>                :     }
<span class="lineNum">     356 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     357 </span>                : 
<span class="lineNum">     358 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     359 </span>                :     {           
<span class="lineNum">     360 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average FrontSide Time for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgFrontSideTimePerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     361 </span>                :     }
<span class="lineNum">     362 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     363 </span>                : 
<span class="lineNum">     364 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     365 </span>                :     {           
<span class="lineNum">     366 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Queueing Delay for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgQueueDelayPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     367 </span>                :     }
<span class="lineNum">     368 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     369 </span>                : 
<span class="lineNum">     370 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     371 </span>                :     {           
<span class="lineNum">     372 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Cmd Buffer Time for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgCBufDelayPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     373 </span>                :     }
<span class="lineNum">     374 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     375 </span>                : 
<span class="lineNum">     376 </span><span class="lineCov">            520 :     for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)     </span>
<span class="lineNum">     377 </span>                :     {           
<span class="lineNum">     378 </span><span class="lineCov">           1536 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Bus &amp; Memory Delay for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgBusMemDelayPerThread[i] &lt;&lt; endl;</span>
<span class="lineNum">     379 </span>                :     }
<span class="lineNum">     380 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     381 </span>                : 
<span class="lineNum">     382 </span>                : /*    for (unsigned int i=0; i&lt;NO_OF_THREADS; i++)   
<span class="lineNum">     383 </span>                :     {           
<span class="lineNum">     384 </span>                :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Throttling time for Thread &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgThrottlePerThread[i] &lt;&lt; endl;
<span class="lineNum">     385 </span>                :     }
<span class="lineNum">     386 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     387 </span>                : */
<span class="lineNum">     388 </span>                : 
<span class="lineNum">     389 </span>                :                                 
<span class="lineNum">     390 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     391 </span>                :     {           
<span class="lineNum">     392 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Request  for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; reqPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     393 </span>                :     }
<span class="lineNum">     394 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     395 </span>                :    
<span class="lineNum">     396 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     397 </span>                :     {           
<span class="lineNum">     398 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hits  for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; hitsPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     399 </span>                :     }
<span class="lineNum">     400 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     401 </span>                : 
<span class="lineNum">     402 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     403 </span>                :     {           
<span class="lineNum">     404 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Hit Rate  for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; hitRatePerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     405 </span>                :     }
<span class="lineNum">     406 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     407 </span>                : 
<span class="lineNum">     408 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     409 </span>                :     {           
<span class="lineNum">     410 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Latency  for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgLatPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     411 </span>                :     }
<span class="lineNum">     412 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     413 </span>                : 
<span class="lineNum">     414 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     415 </span>                :     {           
<span class="lineNum">     416 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average FrontSide Time for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgFrontSideTimePerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     417 </span>                :     }
<span class="lineNum">     418 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     419 </span>                : 
<span class="lineNum">     420 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     421 </span>                :     {           
<span class="lineNum">     422 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Queueing Delay for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgQueueDelayPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     423 </span>                :     }
<span class="lineNum">     424 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     425 </span>                : 
<span class="lineNum">     426 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     427 </span>                :     {           
<span class="lineNum">     428 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Cmd Buffer Time for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgCBufDelayPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     429 </span>                :     }
<span class="lineNum">     430 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     431 </span>                : 
<span class="lineNum">     432 </span><span class="lineCov">             72 :     for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)       </span>
<span class="lineNum">     433 </span>                :     {           
<span class="lineNum">     434 </span><span class="lineCov">            192 :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Bus &amp; Memory Delay for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgBusMemDelayPerBank[i] &lt;&lt; endl;</span>
<span class="lineNum">     435 </span>                :     }
<span class="lineNum">     436 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     437 </span>                : 
<span class="lineNum">     438 </span>                : /*    for (unsigned int i=0; i&lt;NO_OF_BANKS; i++)     
<span class="lineNum">     439 </span>                :     {           
<span class="lineNum">     440 </span>                :         str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Throttling time for Bank &quot; &lt;&lt; i &lt;&lt; &quot; = &quot; &lt;&lt; avgThrottlePerBank[i] &lt;&lt; endl;
<span class="lineNum">     441 </span>                :     }
<span class="lineNum">     442 </span>                :     str &lt;&lt; endl;
<span class="lineNum">     443 </span>                : */
<span class="lineNum">     444 </span><span class="lineCov">             16 :      for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     445 </span>                :     {
<span class="lineNum">     446 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">     447 </span>                :         {
<span class="lineNum">     448 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BANKS; k++)</span>
<span class="lineNum">     449 </span>                :             {
<span class="lineNum">     450 </span><span class="lineCov">            640 :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Average Occupancy for Channel &quot; &lt;&lt; i &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Rank &quot; &lt;&lt; j &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Bank &quot; &lt;&lt; &quot;, &quot; &lt;&lt; k &lt;&lt; &quot; = &quot; &lt;&lt; rbufferOccupancyRatio[i][j][k] &lt;&lt; endl;</span>
<span class="lineNum">     451 </span>                :             }
<span class="lineNum">     452 </span>                :         }
<span class="lineNum">     453 </span>                :   }
<span class="lineNum">     454 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     455 </span>                : 
<span class="lineNum">     456 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     457 </span>                :     {
<span class="lineNum">     458 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">     459 </span>                :         {
<span class="lineNum">     460 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BANKS; k++)</span>
<span class="lineNum">     461 </span>                :             {
<span class="lineNum">     462 </span>                :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Occupancy Cycles for Channel &quot; &lt;&lt; i &lt;&lt; &quot;, &quot; 
<span class="lineNum">     463 </span><span class="lineCov">            640 :                     &lt;&lt; &quot; Rank &quot; &lt;&lt; j &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Bank &quot; &lt;&lt; &quot;, &quot; &lt;&lt; k &lt;&lt; &quot; = &quot; &lt;&lt; ((MC*)mc)-&gt;reqH-&gt;chan[i].rank[j].bank[k].bufferOccupancy &lt;&lt; endl;</span>
<span class="lineNum">     464 </span>                :             }
<span class="lineNum">     465 </span>                :         }
<span class="lineNum">     466 </span>                :     }
<span class="lineNum">     467 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     468 </span>                : 
<span class="lineNum">     469 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     470 </span>                :     {
<span class="lineNum">     471 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">     472 </span>                :         {
<span class="lineNum">     473 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BANKS; k++)</span>
<span class="lineNum">     474 </span>                :             {
<span class="lineNum">     475 </span>                :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Buffer Full Cycles for Channel &quot; &lt;&lt; i &lt;&lt; &quot;, &quot; 
<span class="lineNum">     476 </span><span class="lineCov">            640 :                     &lt;&lt; &quot; Rank &quot; &lt;&lt; j &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Bank &quot; &lt;&lt; &quot;, &quot; &lt;&lt; k &lt;&lt; &quot; = &quot; &lt;&lt; bufferFullCycles[i][j][k] &lt;&lt; endl;</span>
<span class="lineNum">     477 </span>                :             }
<span class="lineNum">     478 </span>                :         }
<span class="lineNum">     479 </span>                :     }
<span class="lineNum">     480 </span>                :     str &lt;&lt; endl;  
<span class="lineNum">     481 </span>                : /*
<span class="lineNum">     482 </span>                :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)
<span class="lineNum">     483 </span>                :     {
<span class="lineNum">     484 </span>                :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)
<span class="lineNum">     485 </span>                :         {
<span class="lineNum">     486 </span>                :             for (unsigned int k=0; k&lt;NO_OF_BUFFERS; k++)
<span class="lineNum">     487 </span>                :             {
<span class="lineNum">     488 </span>                :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Empty Cycles for Channel &quot; &lt;&lt; i &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Rank &quot; &lt;&lt; j &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Bank &quot; &lt;&lt; &quot;, &quot; &lt;&lt; k &lt;&lt; &quot; = &quot; &lt;&lt; emptyCycles[i][j][k] &lt;&lt; endl;
<span class="lineNum">     489 </span>                :             }
<span class="lineNum">     490 </span>                :         }
<span class="lineNum">     491 </span>                :     }
<span class="lineNum">     492 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     493 </span>                : */
<span class="lineNum">     494 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     495 </span>                :     {
<span class="lineNum">     496 </span><span class="lineCov">             24 :         for (unsigned int j=0; j&lt;NO_OF_RANKS; j++)</span>
<span class="lineNum">     497 </span>                :         {
<span class="lineNum">     498 </span><span class="lineCov">            144 :             for (unsigned int k=0; k&lt;NO_OF_BUFFERS; k++)</span>
<span class="lineNum">     499 </span>                :             {
<span class="lineNum">     500 </span><span class="lineCov">            640 :                 str &lt;&lt; &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;DRAM Busy Time for Channel &quot; &lt;&lt; i &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Rank &quot; &lt;&lt; j &lt;&lt; &quot;, &quot; &lt;&lt; &quot; Bank &quot; &lt;&lt; &quot;, &quot; &lt;&lt; k &lt;&lt; &quot; = &quot; &lt;&lt; ((MC*)mc)-&gt;dram-&gt;dc[i].dramBankBusyCycles[j][k] &lt;&lt; endl;</span>
<span class="lineNum">     501 </span>                :             }
<span class="lineNum">     502 </span>                :         }
<span class="lineNum">     503 </span>                :     }
<span class="lineNum">     504 </span>                :     str &lt;&lt; endl;                  
<span class="lineNum">     505 </span>                : 
<span class="lineNum">     506 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     507 </span><span class="lineCov">             16 :     for (unsigned int i=0; i&lt;NO_OF_CHANNELS; i++)</span>
<span class="lineNum">     508 </span>                :     {
<span class="lineNum">     509 </span><span class="lineCov">             16 :         str  &lt;&lt;  &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Bus Busy Cycles = &quot; &lt;&lt; ((MC*)mc)-&gt;bus-&gt;dataBus[i].busBusyTime &lt;&lt; endl;</span>
<span class="lineNum">     510 </span><span class="lineCov">             16 :         str  &lt;&lt;  &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Per Bus occupancy = &quot; &lt;&lt; (((MC*)mc)-&gt;bus-&gt;dataBus[i].busBusyTime+0.0)/Simulator::Now()*100 &lt;&lt; endl;</span>
<span class="lineNum">     511 </span><span class="lineCov">             16 :         str  &lt;&lt;  &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;DRAM Busy Cycles = &quot; &lt;&lt; ((MC*)mc)-&gt;dram-&gt;dc[i].dramBusyCycles;</span>
<span class="lineNum">     512 </span>                :     }
<span class="lineNum">     513 </span>                :     str &lt;&lt; endl;
<span class="lineNum">     514 </span><span class="lineCov">             16 :     str &lt;&lt;  &quot;MC [&quot; &lt;&lt; n &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Total Cycles = &quot; &lt;&lt; Simulator::Now() &lt;&lt; endl;</span>
<span class="lineNum">     515 </span>                : 
<span class="lineNum">     516 </span><span class="lineCov">              8 :     return str.str();</span>
<span class="lineNum">     517 </span><span class="lineCov">              2 : }</span>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
